package org.yaaic.gps_utils;

public class LocationObj
{
    private final double tLat, tLong, lattitude, longitude;


    public LocationObj(double tLat, double tLong, double lattitude,
        double longitude)
    {
        super();
        this.tLat = tLat;
        this.tLong = tLong;
        this.lattitude = lattitude;
        this.longitude = longitude;
    }

    public LocationObj(double lattitude, double longitude)
    {
        this(0,0, lattitude, longitude);
    }


    public double calcDist(LocationObj otherLoc){
        return ( Math.sqrt( Math.pow(lattitude-otherLoc.getLattitude(),2)  + Math.pow((longitude-otherLoc.getLongitude()),2) )  );
    }

    public double gettLat()
    {
        return tLat;
    }

    public double gettLong()
    {
        return tLong;
    }

    public double getLattitude()
    {
        return lattitude;
    }

    public double getLongitude()
    {
        return longitude;
    }

    
    public String toString() {
        return "Lat: " + lattitude + ", Long: " + longitude;
    }

}
